package admin

import (
	"last/pkg/database"
)

// LoginByUserName 通过 user_name 账号
func LoginByUserName(userName string,data interface{}) error {
	
	return database.DB.Model(Admins{}).Select("password").Where("user_name = ?", userName).Find(&data).Error
}

// Me 我的信息
func Me(userName interface{}, admin interface{}) error {
	return database.DB.Model(Admins{}).Where("user_name = ?", userName).Find(&admin).Error
}
